package com.oa.yxg.dao;


import java.util.List;

import org.hibernate.criterion.Example;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.oa.domain.Dept;
import com.oa.domain.TbGroups;


public class YxgDaoImpl extends HibernateDaoSupport implements YxgDao {

	public List<TbGroups> getTbGroupsByExample(TbGroups tbGroups) {
		return getSession().createCriteria(TbGroups.class).add(Example.create(tbGroups)).list();
	}

	public List<Dept> getDept() {
		return getSession().createQuery("from Dept").list();
	}

	public void addTbGroup(TbGroups tbGroups) {
		getSession().save(tbGroups);
	}


}
